Skip to main content
Legend
August 9, 2018
Question

AIR 31 and -platformsdk switch of iOS12 Beta - unable to compile

  • August 9, 2018
  • 9 replies
  • 14097 views

Firstly many thanks for AIR 31 Beta. I am glad I am able to run on iOS12 Beta.

Problem Description:

When I use Xcode10 beta to compile with iOS 12 beta SDK I receive compile errors

Steps to Reproduce:

Compile basic Hello World AIR app for iOS 12 beta using Xcode 10 beta 5 and the switch:  -platformsdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk

Actual Result:

ld: library not found for -lstdc++

ld: library not found for -lstdc++

Compilation failed while executing : ld64

If I copy + replace ld from

/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

to

/AIRSDK_31Beta/lib/aot/bin/ld64/ld64 I receive the following error:

dyld: Library not loaded: @rpath/libtapi.dylib

  Referenced from: /Users/xxxxx/SDKs/AIRSDK_31B/lib/aot/bin/ld64/ld64

  Reason: image not found

I have attempted to copy libtapi.dylib from xctoolchain to several folders under the AIRSDK but I still receive the image not found

Expected Result:

I can use  -platformsdk switch to compile using Xcode 12 beta

Any Workarounds:

None Known

I have added same bug the the issue tracker https://tracker.adobe.com/#/view/AIR-4198714

This topic has been closed for replies.

9 replies

Participant
December 13, 2018

Has anyone found a solution to this problem?

I build an ipa using AIR SDK 32(Beta) . I have also added iPhone SDK 12.1 from path "Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk ".

When i publish the app in new 2018 iPad Pro (11 inch) (actual device and not on simulator) my  application does not get loaded in fullscreen.

In iPad Pro (both 11 inches and new 12.9 inches), we see a rectangular black border around the app, all four sides do not stretch to the edges of the screen.

Is there a new default(launch) image for the new iPAD? Does AIR 32 have default image support for new ipad's?

How do i support fullscreen mode?

Participant
December 4, 2018

I build an ipa using AIR SDK 32 and with above changes to linker file. I have also added iPhone SDK 12.1 from path "Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk". When i publish the app in new iPad Pro (11 inch) my  application does not get loaded in fullscreen. In iPad Pro (both 11 inches and new 12.9 inch), we see a rectangular black border around the app, all four sides do not stretch to the edges of the screen.Is there a new default(launch) image for the new iPAD? How do i support fullscreen mode?

grahamsmith10151448
Inspiring
December 4, 2018

Hi ,

So are you are using the iOS simulator with Animate ? and you copied over the smaller "ld" file from Xcode 10.1 .. not working for me .

RE launch images :-

I believe it's necessary to include default images for BOTH portrait and landscape for the iPad Pros.

(iPad Pro 10.5)

Default-Portrait-834w-1112h@2x~ipad  

Default-Landscape-834w-1112h@2x~ipad

(iPad Pro 12)

Default-Portrait-1024w-1366h@2x~ipad 

Default-Landscape-1024w-1366h@2x~ipad

You won't get screen display at the correct resolution unless you use both launch images apparently.

This is good reference for current iOS launch images..

https://wiki.starling-framework.org/manual/ios_launch_images

grahamsmith10151448
Inspiring
November 26, 2018

I think we all need to look at this post from Michael at Distriqt, looks like he's spotted the problem ? : -

https://forum.starling-framework.org/topic/air-32-ios-12-issues-resolved

Colin Holgate
Inspiring
November 26, 2018

I emailed Michael the day before he posted there, which got him looking into the issues.

PreranMohanaraj​ can you see if you can get the AIR guys to look into the linker issues?

Rohit Guglani
Adobe Employee
Adobe Employee
November 21, 2018

Hello Everyone,

The beta is now live (Adobe AIR 32 Beta | application development - Adobe Labs ) and we would love to hear feedback from all of you. Thanks for your patience.

Regards,

Rohit

el111Author
Legend
November 21, 2018

Hi Rohit Guglani

I'm afraid there is very little that is actually working with this Beta.

Xcode Version 10.1 (10B61)

OSX Mojave 10.14

Simulator

ld: unexpected token: !tapi-tbd-v3 file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/lib/libc++.tbd' for architecture x86_64

Compilation failed while executing : ld64

ADT command line:

/Users/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/183.4284.36/IntelliJ IDEA 2018.3 EAP.app/Contents/jdk/Contents/Home/jre/bin/java -Dapplication.home=/Users/SDKs/AIRSDK_32 -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx2048m -jar /Users/SDKs/AIRSDK_32/lib/adt.jar -package -target ipa-debug-interpreter-simulator -storetype PKCS12 -keystore /Users/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/183.4284.36/IntelliJ IDEA 2018.3 EAP.app/Contents/plugins/flex/lib/temp_keystore.p12 -storepass /Users/flash/AIR32-TEST/out/production/AIR32-TEST/Main.ipa /Users/flash/AIR32-TEST/out/production/AIR32-TEST/Main-app.xml -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -C /Users/flash/AIR32-TEST/out/production/AIR32-TEST Main.swf

If I replace ld64 in AIR with the one from Xcode I get this error instead:

An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=164):

Unable to boot device in current state: Booted

Device

When building and packaging with Swift dynamic Frameworks, they are not being signed correctly.

Swift Libraries are v4.2.1 from Xcode10.1

Termination Description: DYLD, Library not loaded: @rpath/libswiftCore.dylib | Referenced from: /private/var/containers/Bundle/Application/5EA277A6-87D8-477F-8760-B352180CCEC9/FreSwiftExample.app/Frameworks/FreSwift.framework/FreSwift | Reason: no suitable image found.  Did find: | /private/var/containers/Bundle/Application/5EA277A6-87D8-477F-8760-B352180CCEC9/FreSwiftExample.app/Frameworks/libswiftCore.dylib: code signature invalid for '/private/var/containers/Bundle/Application/5EA277A6-87D8-477F-8760-B352180CCEC9/FreSwiftExample.app/Frameworks/libswiftCore.dylib' | /private/var/containers/Bundle/Application/5EA277A6-87D8-477F-8760-B352180CCEC9/FreSwiftExample.app/Frameworks/libswiftCore.dylib: code signature invalid for '/private/var/containers/Bundle/Application/5EA277A6-87D8-477F-8760-B352180CCEC9/FreSwiftExample.app/Frameworks/libswiftCore.dylib'

Triggered by Thread:  0

Device with -platformsdk

ld: unexpected token: !tapi-tbd-v3 file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libc++.tbd' for architecture arm64

ld: unexpected token: !tapi-tbd-v3 file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/lib/libc++.tbd' for architecture armv7

Compilation failed while executing : ld64

ADT command line:

/Users/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/183.4284.36/IntelliJ IDEA 2018.3 EAP.app/Contents/jdk/Contents/Home/jre/bin/java -Dapplication.home=/Users/SDKs/AIRSDK_32 -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx512m -jar /Users/SDKs/AIRSDK_32/lib/adt.jar -package -target ipa-debug-interpreter -listen 7936 -storetype PKCS12 -keystore xxx.p12 -storepass -provisioning-profile xxx /Users/flash/Swift-IOS-ANE/framework_src/example-ios/bin-release/device/FreSwiftExample.ipa /Users/flash/Swift-IOS-ANE/framework_src/example-ios/bin-release/device/Main-app.xml -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -extdir /Users/flash/Swift-IOS-ANE/framework_src/native_extension/ane -C /Users/flash/Swift-IOS-ANE/framework_src/example-ios/bin-release/device Main.swf -C /Users/flash/Swift-IOS-ANE/framework_src/example-ios/ios_dependencies/device . -C /Users/flash/Swift-IOS-ANE/framework_src/example-ios/system . -C /Users/flash/Swift-IOS-ANE/framework_src/example-ios/src Assets.car

Rohit Guglani
Adobe Employee
Adobe Employee
November 28, 2018

The error doesn't seem related to the library change from stdc++ to c++, but to a missing object type.

As I mentioned in the starling forum:

Using the AIR 32 beta causes:

Undefined symbols for architecture arm64: "_OBJC_EHTYPE_$_NSException", referenced from: GCC_except_table0 in ... 

Attempting to link against the 12.1 iOS SDK causes (eg from here):

ld: unexpected token: !tapi-tbd-v3 file '/Users/marchbold/work/sdks/ios/iPhoneOS12.1.sdk/usr/lib/libc++.tbd' for architecture arm64 ld: unexpected token: !tapi-tbd-v3 file '/Users/marchbold/work/sdks/ios/iPhoneOS12.1.sdk/usr/lib/libc++.tbd' for architecture armv7 Compilation failed while executing : ld64 

Updating the linker alone, still causes:

Undefined symbols for architecture arm64: "_OBJC_EHTYPE_$_NSException", referenced from: GCC_except_table0 in ... 

Then updating the linker AND using the 12.1 iOS SDK is successful.

So I suspect the beta has an old linker and missing some of the iOS frameworks.

I started replacing frameworks in the AIR SDK and found if I update the

CoreFoundation.framework

from the iOS 12.1 SDK (in addition to the linker) then the AIR SDK would start to work correctly again.

I believe this is the framework that normally contains NSException so pretty good guess this is the issue?


Hello Michael,

Thanks for the additional details it helped us in isolating the root issue. I have copied few stub files here Adobe Creative Cloud

Kindly copy them in the <AIRSDK>/Lib/Aot folder and let us know if this fixes the issue you are facing.

Regards,

Rohit

Rohit Guglani
Adobe Employee
Adobe Employee
November 14, 2018

Hello Everyone,

We are in the process of releasing AIR beta. It should be out this week and will have the fixes for XCode 10. I will update the thread once we are live.

Regards,

Rohit

Inspiring
November 14, 2018

Awesome, thanks!

Also does that mean that AIR is going to be compiled against IOS 12 SDK?

Inspiring
November 3, 2018

I have the same issue when trying to run my app to iOS Simulator from Flash Builder 4.7 on Mac High Sierra 10.13.6 and AR SDK 31 using XCode 10.1

When debugging normally everything works fine, this only happens when I try to to run app on iOS simulator.

Known Participant
October 9, 2018

Yep, that's kinda bad. It's been known since XCODE BETA (August) that these changes will be effective with release of iOS 12 and xcode 12. Yet adobe didn't bother to anticipate them?

k_bitgood
Inspiring
September 20, 2018

Is this solved yet or is there a "known issue" to track? Xcode 10 and iOS 12 are officially launched but I'm still getting the same error.

ld: library not found for -lstdc++

Compilation failed while executing : ld64

I'm using:

macOS Version 10.13.6 (17G65)

Xcode Version 10.0 (10A255)

Air SDK Version 31.0.0.96

el111Author
Legend
September 23, 2018

The latest AIR is still built against iOS 11 SDK.

With iOS 12 SDK now not supporting libstdc++ Adobe will have to compile against libc++

Will need to wait until AIR is built against iOS 12 SDK which if it's the same as last year will be AIR 32 in December

andrewg48892717
Participant
September 28, 2018

So to confirm we should hold off on upgrading to Xcode 10 until Adobe fixes this issue right?

I'm having the same issues outlined above.

Colin Holgate
Inspiring
August 9, 2018

In replacing the ld64 from Xcode to AIR, you do need to rename the file (Apple call it ld, Adobe call it ld64). Also, that ought to only help using the Simulator, I think you should have been able to build onto a device, because Xcode and Simulator are not involved in doing that.

el111Author
Legend
August 10, 2018

I am aware if the ld64 naming convention and did rename as ld64

ld64 is heavily involved with compiling regardless of the target.

Note this is not building with AIR 31 to run on iOS 12, but using the platform switch to use iOS 12 SDK which is still in beta.

It is related to allowing ANE developers to write native code which is specific to the newer SDK.

So if I need to write ARKit 2 code I need to compile against iOS 12 SDK.

AIR is understandably still built with iOS11 SDK.

But each year there is a period of ~3months where we have to wait for AIR to be compliant. I was hoping that wouldn't be present this year.

Colin Holgate
Inspiring
August 10, 2018

Well, there was an update two days ago. Now might be a good time to ask. They used to have an update every two weeks, hopefully we'll get back to that.