We're trying to get user_posts approval from Facebook for a new Apple Watch app. We've created an ios simulator build per FB instructions however they use ios-sim to test and its failing to run the app. I know the app works in the iOS Simulator outside of Xcode because I've successfully loaded & tested it with XCRUN commands (loading the .app, .appex and watch kit.app objects and then running the .app or running the watchkit.app).
My thoughts on the issue are
Possibly ios-sim hasn't installed the .appex and isn't designed to test .app's with app extensions.
Possibly the user is not using the latest Xcode 6.2 and there's a problem with running Watchkit extensions
Details of the FB response below. Has anyone else successfully tested an .appex with ios-sim or successfully submitted an .appex to Facebook for testing (specifically a Watchkit .appex) or has any advice on how to proceed? Would be much appreciated.
Searching Stackoverflow hasn't shown any related questions on this topic. We've provided a feedback response to FB and posted on the FB developer forum as well. Many thanks!
Notes from our review team iPhone I received this error in my terminal
when trying to load the app:
Last login: Tue Apr 7 13:12:02 on ttys003 chandlerhol-mbp:~
chandlerholmes$ ios-sim launch ~/Downloads/Swhorl.app/ Session could
not be started: Error Domain=LaunchServicesError Code=0 "Unable to
run app in Simulator" UserInfo=0x7f9cb2a005e0
{Error=AppexBundleUnknownExtensionPointIdentifier,
ErrorDescription=Appex bundle at
/Users/chandlerholmes/Library/Developer/CoreSimulator/Devices/DF420CB7-66DA-405A-9FF8-A7AA84CE5806/data/Library/Caches/com.apple.mobile.installd.staging/temp.kV56mj/extracted/Swhorl.app/PlugIns/Swhorl
WatchKit Extension.appex with id com.verteq.Swhorl.watchkitextension
specifies a value (com.apple.watchkit) for the
NSExtensionPointIdentifier key in the NSExtension dictionary in its
Info.plist that does not correspond to a known extension point.,
NSLocalizedFailureReason=An error was encountered while running
(Domain = LaunchServicesError, Code = 0),
NSUnderlyingError=0x7f9cb2802f20 "The operation couldn’t be completed.
(LaunchServicesError error 0.)", NSLocalizedDescription=Unable to run
app in Simulator}
chandlerhol-mbp:~ chandlerholmes$
iPhone
Your provided file has been configured incorrectly. For iOS Simulator Builds, follow our instructions and resubmit. For Android
submissions, please build a .APK file for upload.
have now got an answer to this question. We are now successfully approved for the user_posts permission! :) Here's how we achieved it, hope you will find this useful.
We re-submitted the application, no changes to screen shots or the build or instructions, but with the following paragraph prominent in the Facebook login integration section on the front page of the application:
PLEASE NOTE BEFORE TESTING: This app cannot be tested successfully
with IOS-SIM because its an Apple Watch app and it is not possible to
open an external display (Hardware/External Displays/Apple Watch) when
launched from ios-sim. We've tested the simulator build successfully
using XCRUN, apple's own command line tools - please see user_posts
testing notes for detailed instructions and we hope this will be
satisfactory for you to your complete testing. Many thanks
Here are the instructions that we included within the specific request for the user_posts permission:
PLEASE NOTE IOS-SIM WILL NOT WORK WITH THIS APP. Its not currently possible to test
an Apple Watch app with ios-sim, you cannot open the external display from
the simulator.
To test user_posts with Swhorl:
INSTALLATION
1. Open Xcode on a Mac with OS X Mavericks or Yosemite
a. Select Xcode menu, About Xcode Ensure you have Xcode Version 6.2 (6C131e) or later
b. Select Xcode menu, Open Developer Tool submenu, select iPhone Simulator
2. In iPhone simulator
a. IOS Simulator menu, select Reset Contents And Settings
b. Select Hardware menu, Device submenu, then iPhone6
c. Select Hardware menu, External Displays, Apple Watch 42mm
3. Locate the copy of the Swhorl simulator build uploaded with this submission place it
in a folder of your choice and double click to expand the zip file, then
a. Open Terminal and change directory to the expanded 'Release-iphonesimulator' folder
b. With the simulator running, install the 3 app components with these commands
xcrun simctl install booted Swhorl.app
xcrun simctl install booted Swhorl\ Watchkit\ App.app
xcrun simctl install booted Swhorl\ Watchkit\ Extension.appex
c. Use the following commands to run the App and Watckit app respectively in the simulator
xcrun simctl launch booted com.verteq.Swhorl
xcrun simctl launch booted com.verteq.Swhorl.watchkitapp
As a separate recommendation, when digging through the Facebook help pages we noted that its possible to get Direct Support from FB, but only once you've registered as a business and connected your app. An existing request that's failed won't automatically qualify for support, you have to re-submit. However it DOES keep all the details of your previous submission, so no major re-typing needed.
You can read how to do that here Facebook App Review Guideleine - scroll to the bottom of the page for the section on Direct Support. We didn't need it this time but I recommend it as it may provide a channel for you to discuss your submission that you would not otherwise have.
Happy submitting!
Related
I have an flutter app for ios and can build it for the app store using:
flutter build ios --release
But how can I build an Ad-Hoc app for ios?
Pre-requisite
Apple Developer Program membership ($99/year)
Distribution certificate added to your machine
In the Xcode project (Signing & Capabilities tab), select your team/ developer account which has the Apple Developer program membership.
1. Create an Archive (.xcarchive)
Technically you do not build an Ad Hoc app, you build a debug/release/profile app, which you then distribute via a distribution method, one option is Ad Hoc.
Using command line: You can run flutter build ipa to build the xcarchive. Then it should show a URL for your Runner.xcarchive at the output (double click that link), or
Using Xcode: Open the Xcode project, and in the menu bar, click Product > Archive. The organizer window will open once the archive is complete.
2. Create an .ipa
Now the Organizer window should be open. Press the Distribute App button: you should see multiple options. You can share the .ipa file with users, and they can install it onto their iPhone:
It's worth noting you can also create an .ipa using xcodebuild, but when you're first learning, it's nicer to use Xcode.
3. Install the .ipa on a device.
I wrote an answer about that: https://stackoverflow.com/a/68968301/7365866
Reminder
Just remember to do this:
Action Required: You must set a build name and number in the pubspec.yaml file
version field before submitting to the App Store.
You can use Code Magic's CLI tool to achieve that.
On their CLI (locally installed or on your CI server), there is an option to add
--type IOS_APP_ADHOC
See at the end of their signing documentation section for Specifying code signing configuration
You can use --export-method in the flutter build command, example:
flutter build ipa --release --export-method=ad-hoc
For Someone out there, who have trouble building ios application since they don't have an apple developer account, here's a method that i do and i use.
1st if you are an ios user you can connect your ios device into your mac and do a flutter run --release. you can also do it with just the simulator too and it does works the same.
Now, the ios app is created, using your 7 days free trial developers provisioning profile, what we need is to use some programs likie imazing,apple configurator or itunes, to get the ipa from inside the app.
Now you have build the ios app with a release version, and you can redistribute it with just a 7 days free trial version of yours.
I am trying to simulate an upgrade from version 2.0 to 2.1. I have version 2.0 hosted in testflight, so I did install it in my device. Then I tried running the app from xcode. However what happened is that the app did not get overlapped, instead it created two apps with the same name. How can I make it such that when I run the app from xcode it overlays the old version?
I've made sure that the bundle identifier is the same.
Well the info you can get while updating can be found # this link here.
when user updates an app, Documents folder is stored as is, including
NSUserDefaults (but, sometimes user download app via iTunes and
replace the whole application, crying 'OMG! update killed all my
levels progress!'); Application bundle is erased and replaced by new
one (anyway, it is readonly for user); Re-deployment of new build
version will be enough;
You can't access the appstore inside the simulator because: # link here
It's a simulator not an emulator. Even if there was an App Store in
the Simulator, none of the apps in the store would work since they are
compiled for ARM CPUs while the Simulator runs x86 code.
Another stack overflow # link here states:
Build and install your old version, generate some data, and then
install the new version on top of it.
For testing before submitting to the Appstore I generally download
from the AppStore again the old version, and then install with Xcode
the newer version - for your next update... ;-)
And another stack overflow (that I lost the link for) states:
No, the simulator runs i386 binaries and iPhone appstore apps are ARM
binaries apps.
iOS apps are compiled to machine code, Android apps are run in a
Virtual Machine using byte code and are translated to machine code at
the time they are run.
So no, I don't believe you can run it in the simulator, how ever you can have older projects saved on the iPhone and test both out. And the apple documentation is # this link here.
Read this: https://developer.apple.com/library/ios/technotes/tn2285/_index.html
You cannot simulate update in XCode (neither in simulator or connected device). You have to create IPA file and simulate update process via iTunes.
Is it possible to use Xcode Instruments to profile a third-party app? Right now, whenever I trying to profile any third-party app installed on device, I got error saying
'Target failed to run: Remote exception encountered: failed to get task for pid '
Is there any settings that need to be configured?
From Apple documentation: For your protection, the instrument does not allow you to process any application that is not code-signed with your provisioning profile. This includes any copy that has been downloaded from the iTunes App Store.
UPDATE
As of more recent versions of iOS, you can only attach the profiler to your own developer-signed apps.
ORIGINAL
Using Xcode 4.4.1 and my iPad 3 running iOS 5.1.1, I'm able to use the Core Animation and Time Profiler instruments on third-party apps. I tried it with Twitter and Minecraft PE.
The profiles are rather useless since I don't have symbols for the apps. I just get a lot of addresses in hex. And Instruments won't even show me the disassembly of the apps. I believe this is because iOS, for security, doesn't allow Instruments (or gdb or lldb) to look at the address space of apps installed from the App Store.
I'm attempting to install a TestFlight app on XCode's iOS simulator using the iPhone simulator. The link to the TestFlight app takes me to a page that says "This device will need to be registered before it can install betas."
There is a friendly Register button. When I click the register button, it says "Registering Device" and then it takes me to the iPhone's General settings page. If I navigate back to the TestFlight page, it says "Registration Failed."
Does anyone know of a way to install a TestFlight app on the iPhone Simulator? Thanks.
The app you are trying to install is an app compiled for arm architecture, which is different from the simulator (the simulator is not an emulator). The simulator only runs x86 apps compiled for it. You will need to contact the developer of the application to send you the x86 binaries, and add them directly to the application directory of the iOS simulator. The directory (on Xcode 4.5 beta 4) is /Applications/Xcode45-DP4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Applications. Note that the simulator's sdk version has to match the version of iOS you are trying to use the simulator with.
If you need test your Release application
you can run your on a release build go to
->Product->Scheme -> Edit scheme-> in Run change debug to Release
in this you can check your release build in simulator
If I had to guess, I would presume that since the Simulator is not a valid device, it is not able to install the TestFlight Profiles onto the device, and therefore failing registration process (when you are directed to the iPhone's Settings, it tries to install a profile on your device).
May I ask why you are trying to install the app via the iPhone Simulator? If the app's code exists on GitHub, you can use the GitHub for Mac app to checkout the code, and XCode to compile the project and build it to the iOS Simulator. There should not really be any reason to have to install TestFlight on the iOS Simulator.
Every time I install my app to an iDevice using the ad hoc distribution method (e.g. archive, create an .ipa file and let my testers download it), the app will not run until the device is rebooted. Much like the second link posted below, I did not have this problem before upgrading to iOS 5 and XCode 4.3.1 -- currently running iOS 5.1 / XCode 4.3.2 and still having the same problem. If I connect the iPhone / iPad using USB (and run directly from xcode), the app installs normally and runs fine.
Currently, when installing ad hoc, one of two things happens:
1: The app installs "normally" and the icon is visible -- but pressing it brings up the launch image, then the app fails to black screen -- then back to springboard. App never gets any further.
• or •
2: App installation seems to proceed normally, then when the "Installing..." phase is complete, the app icon simply vanishes. Reboot the iPhone and the app icon is exactly where it is supposed to be.
In either case, after a reboot of the iPhone it runs fine.
Any suggestions??
This is the closest issue I could find, but I have this problem on iOS 5.0 / 5.1 and even when installing my app to devices for the first time:
iPhone app fails to launch after install on iOS 4, works after device reboot
I also found this article, so I checked my Entitlements setting (in Targets) -- Not enabled: ad hoc app failed to install on real iPad
I've had this exact problem before when I have a different 'Bundle Identifier' set in the Info.plist to the App Id you set up in the provisioning portal.
If that doesn't work, you might try checking the log of your device when attempting to install the ad hoc ipa.
XCode -> Window -> Organizer -> Devices -> Your device -> Console