Building for iOS Simulator, but linking in object file built for iOS

Hello.

I found similar discussion on this subject but this probably something different so I thought to ask separately.

I was try building sample project provided by FeathersUI/Openfl on iOS.

I ran following command to build the project for iOS-simulator:
% haxelib run lime build ios -simulator

This went well and generates Xcode project under “bin/iOS” directory along with its .xcodeproj file. I open that on Xcode 16.1.

While try running the project on iOS simulator, I received following error:

Building for 'iOS-simulator', but linking in object file (/Users/devsena/Desktop/components-explorer/bin/ios/Components/lib/arm64/liblime.a[2](d6db1c91_ColorMatrix.o)) built for 'iOS'

After some StackOverflow, I change this in project’s Build Settings. That removes the error for me:
image

Now when I tries to run the project on iOS simulator, it throws me following error and never installs on simulator:

For reference, following are the versions I’m using:

  • Lime 8.2.1
  • Haxe 4.2.5
  • Openfl 9.4.0

Any guidance to resolves this problem, or if there is any other way to produce for mobile platform, please let me know. Thanks!

Did you build iOS ios without -simulator previously? If so, you might need to add -clean to ensure that it’s not using object files for a real device instead of the simulator.

I’m currently using macOS Sequoia 15.3, Xcode 16.2 with iOS 18.2, Haxe 4.3.6, OpenFL 9.3.4, and Lime 8.2.2. I was able to get lime test ios -simulator -clean to work on my machine with the same Feathers UI components-explorer project. No changes to the Xcode project required. The one quirk I saw is that the simulator launched, but my app didn’t open. But I ran the command again (without -clean the second time, just to avoid the long C++ build times), and it launched successfully in the already-open simulator.

1 Like

Thank you very much, @joshtynjala ! That was a big help.

But what’s are the process to sign a Haxe/Openfl application with certificate/provisioning-profile and then submit to App Store?

Although the command you suggested works (and manually install the .ipa file in simulator) - but the generated Xcode project turns still faulty.

I wanted to use the generated Xcode project to -

  1. Choose correct certificate and provisioning-profile
  2. Build .xcarchive file to facilitate with Xcode upload process to App-Store/Test-Flight

While I tried to run the generated Xcode project, I continue to see the same problem described in the original issue. I was wondering if you able to run the generated Xcode project at your end or not.

I’m not sure that I’ve tried running the generated Xcode project. I’ve never had a reason to need to do that yet.

See Lime’s iOS: Code Signing documentation.

For testing on a real device (without -simulator), I have successfully specified team-id only. I haven’t released an OpenFL app on the App Store, so I’m not sure if team-id is all you need for that or not. Maybe someone can chime in about that, if they’ve released any apps.

Regardless, we also have options for specifying provisioning-profile and identity. There does not appear to be a way to specify a certificate file for iOS. Only the name of a developer identity from the Keychain.

1 Like