Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: iOS Device - 64 bit platform problem



Permlink Replies: 5 - Last Post: Oct 29, 2016 11:53 PM Last Post By: Lena Ilicheva
Lena Ilicheva

Posts: 83
Registered: 9/22/06
iOS Device - 64 bit platform problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 27, 2016 3:51 AM
C++ Builder 10.1 Up.1 (iOS sdk 10).
If I create iOS project 32 bit for iPnone5 all normally there is no problem it works.

Now preparation for 64 bit in project options:
Release configuration - iOS Device - 64 bit platform:
Cenerate iOS universal binary file (armv7 + arm64)=true

In Version info also add keys:
NSPhotoLibraryUsageDescription
NSCameraUsageDescription

The project normally starts on iPnone5.
But when I press button for Foto or Library applicattion crash.
How fix it for 64 bit?
 
//code for Library
//if press applicattion 64 bit crash
void __fastcall TFormCamera::TakePhotoFromLibraryAction1DidFinishTaking(TBitmap *Image)
{
 Image1->Bitmap->Assign(Image);
}
 
//TFormCamera::TakePhotoFromCameraAction1DidFinishTaking <-- does not work application also falls without any messages or Error: Invalid class typecast
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: iOS Device - 64 bit platform problem [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 27, 2016 9:57 AM   in response to: Lena Ilicheva in response to: Lena Ilicheva
Lena wrote:

But when I press button for Foto or Library applicattion crash.

Did you do ANY debugging to find out why?

//if press applicattion 64 bit crash

On which line exactly? Inside the button OnClick handler? The photo action's
OnDidFinishTaking handler?

void __fastcall
TFormCamera::TakePhotoFromLibraryAction1DidFinishTaking(TBitmap
*Image)
{
Image1->Bitmap->Assign(Image);
}

If that is where the code is crashing, did you verify that Image1 is not
NULL, and Image1->Bitmap is not NULL?

//TFormCamera::TakePhotoFromCameraAction1DidFinishTaking <--
does not work application also falls without any messages or
Error: Invalid class typecast

On which line exactly are you doing a type-cast that fails?

--
Remy Lebeau (TeamB)
Lena Ilicheva

Posts: 83
Registered: 9/22/06
Re: iOS Device - 64 bit platform problem [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 27, 2016 10:48 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Did you do ANY debugging to find out why?

In Debug mode 64 bit works fine event:
void __fastcall TForm1::TakePhotoFromLibraryAction1DidFinishTaking(TBitmap *Image)
But event TakePhotoFromCamera does not work:
void __fastcall TForm1::TakePhotoFromCameraAction1DidFinishTaking(TBitmap *Image)
Debugger Exception Notification
Project raised exception class 6.

In Release mode 64 bit does not work both events:
void __fastcall TForm1::TakePhotoFromLibraryAction1DidFinishTaking(TBitmap *Image)
void __fastcall TForm1::TakePhotoFromLibraryAction1DidFinishTaking(TBitmap *Image)
applicattion crash.

Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: iOS Device - 64 bit platform problem [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 27, 2016 12:48 PM   in response to: Lena Ilicheva in response to: Lena Ilicheva
Lena wrote:

Debugger Exception Notification
Project raised exception class 6.

Have you filed a bug report with Embarcadero?

--
Remy Lebeau (TeamB)
Lena Ilicheva

Posts: 83
Registered: 9/22/06
Re: iOS Device - 64 bit platform problem [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 27, 2016 10:58 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
I was not sure, but now sure.
C ++ Builder 10.1 Up.1 (iOS sdk 10)
1. Open a standard example in debug mode, iOS 64 bit:
C: \ Users \ Public \ Documents \ Embarcadero \ Studio \ 18.0 \ Samples \ CPP \ Mobile Snippets \ AccessCameraApp
2. In the project settings add NSCameraUsageDescription key and put a check C ++ Compiler-> Advanced:
Cenerate iOS universal binary file (armv7 + arm64) = true
3. Starting on the iPhone5 / 5s. When you press get raised exception class 6

1. Open a standard example in debug mode, iOS 64 bit:
C: \ Users \ Public \ Documents \ Embarcadero \ Studio \ 18.0 \ Samples \ CPP \ Mobile Snippets \ CameraRoll
2. In the project settings add NSPhotoLibraryUsageDescription key and put a check C ++ Compiler-> Advanced:
Cenerate iOS universal binary file (armv7 + arm64) = true
3. Starting on the iPhone5 / 5s. When you press get raised exception class 6
Lena Ilicheva

Posts: 83
Registered: 9/22/06
Re: iOS Device - 64 bit platform problem [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 29, 2016 11:53 PM   in response to: Lena Ilicheva in response to: Lena Ilicheva
Cause found.
It is necessary to remove the space before the closing </key>
 
<key>NSPhotoLibraryUsageDescription </key>
<string>To choose photo</string>
<key>NSCameraUsageDescription </key>
<string>Get photo</string>

 
<key>NSPhotoLibraryUsageDescription</key>
<string>To choose photo</string>
<key>NSCameraUsageDescription</key>
<string>Get photo</string>
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02