WatchkitUpload Issues - objective-c

We have discovered one or more issues with your recent delivery for "xxx Mobile". To process your delivery, the following issues must be corrected:
Invalid WatchKit Support - The WatchKitSupport2 folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.
Invalid Executable - The executable '***.app/Watch/watchkitapp.app/PlugIns/watchkitapp Extension.appex/watchkitapp Extension' does not contain bitcode.
Once these issues have been corrected, you can then redeliver the corrected binary.

For second issue you need to enable bitcode for your app target as its required for watch apps.
Select your iOS app target- > Build Settings - > Build Options - > Enable Bitcode
Set it to true.
Refer this for App Thinning

Related

Cannot add a new app to fabric

I am unable to add a new iOS app to fabric by following the instructions of the Fabric macOS plug in.
I have followed all of the instructions found at Crashlytics documentation
When running the app, I receive this error:
2018-03-12 14:22:24.090838-0400 [19139:8550117] [Crashlytics] Version 3.10.1 (129)
2018-03-12 14:22:24.636050-0400 [19139:8550293] [Fabric] unable to complete application configure: Error Domain=FABNetworkError Code=-5 "(null)" UserInfo={status_code=422, type=2, request_id=fbc432572e6f0e10f21d2ddc24c7f272, content_type=text/html; charset=utf-8}
I have tried searching StackOverflow and following answers, but no luck avoiding this error message.
Any ideas on this error message?
I had this problem and discovered that my 'visible' (in Xcode) info.plist was not a file in my root directory, and was an out of date version from earlier development activity. I am not sure why my correct/current info.plist did not display in Xcode. I found the current info.plist in Finder (it was in the root directory in Finder, just not appearing in Xcode). I dragged the file from Finder to Xcode and accepted all the defaults in the dialog that appeared. Then I simply built and ran the current scheme and all worked as it should.
Note: It appears that for some time I have been updating the 'invisible' info.plist directly from my apps Target / Info tab.
Make sure to include all dependency then throw a force crash or runtime error and do not forget to turn on your data or internet connection.

How am I supposed to log exceptions with Fabric

Now, where ever I used to have
Crashlytics.logException(e);
I'm getting an error similar to
The type io.fabric.sdk.android.Kit cannot be resolved. It is indirectly referenced from required .class files MonthlyOffer.java /JOM Android Phone App/src/joelosteen/android/phone/JOMApp/layout line 234 Java Problem
So are we not able to use logException with fabric?
** EDIT **
Thanks to sublime text 3 I did a find in files... and commented out every occorrence of lines with fabric or crashlytics in them:
find: (.*[fabric|crashlytics].*)
in: * (make sure this is your src folder)
replace: // $1
** EDIT **
Using Eclipse v4.2.0
I'm assuming you're using Android Studio. Are you using the latest version of Fabric (2.3.2 as of this writing)? Did the Fabric plugin add the necessary changes to your project?
You can log exceptions by using the logException method as outlined here

Warnings on XCAbstractTest.h, XCTestCase.h, and XCTestSuite.h

I recently turned on stricter warnings for a project, and Xcode started throwing warnings on some of Apple's classes. I'm not sure if this is an Apple bug, or if I'm doing something wrong. I'm using Xcode 6.1.1 on Yosemite.
TL;DR: adding some strict warning flags to your project starts throwing warnings in various XC*Test*.h headers. The issue is intermittent, but the steps below have reproduced the issue on multiple computers.
Steps to reproduce:
Create a new Xcode project via File → New → Project.
Choose iOS → Application → Single View Application.
For Product Name, type MyApp. Choose Objective-C and Universal. Save the project.
Build the project with CommandB. Run the tests with CommandU. Observe that they both finish with no errors or warnings.
Click on the Project to go to the Project Settings.
Click on the blue MyApp Project (as opposed to MyApp or MyAppTests targets).
Click on the Build Settings tab.
Search for Other Warning Flags.
Enter the following string for the Other Warning Flags for the app:
-Weverything -Wno-objc-missing-property-synthesis -Wno-objc-property-synthesis -Wno-direct-ivar-access -Wno-assign-enum -Wno-float-equal -Wno-sign-compare -Wno-switch-enum -Wno-gnu -Wnewline-eof
Build the app again. You should see three or four warnings about treating #import as #import, which is expected given the warnings you just enabled.
Clean the project with CommandShiftK
Build again. You may see extra warnings. If not, then you need to…
Delete the DerivedData folder, at least for this project. It is located at /Library/Developer/Xcode/DerivedData/MyApp-*, where * is some random identifier string. You may also need to delete /Library/Developer/Xcode/DerivedData/ModuleCache.
Clean and build again. And again. It may take a few times. Eventually...
You will see code and documentation warnings on XCAbstractTest.h, XCTestCase.h, and XCTestSuite.h. Screenshot:
As you can see, these warnings would be quite valid on my own code, but this is Apple’s framework code. Is there any way to stop these weirdly intermittent warnings from appearing? Or is it an Apple bug that the file gets warnings at all? I’m leaning Apple bug, because plenty of other Apple headers use #import instead of #import, and none of them is throwing warnings.
Update: I filed a radar: http://www.openradar.me/20038246
Update 2: I was able to glean some more information that may be helpful:
The issue appears to be at least partly related to where Derived Data is stored. See this screen recording, courtesy of Sam Marshall for details: http://cl.samdmarshall.com/a4Hy
Note that, when I reproduce the same steps as in Sam's video on my computer, I am not able to get rid of the extra warnings. They always come back. Possible differences between my and Sam's setups:
Sam is on Xcode 6.1, while I am on 6.1.1.
Sam is on Mavericks, while I am on Yosemite (10.10.2).
When I build in Xcode 6.3b2, I get an additional warning about "building module 'UIKit'". See screenshot: http://cl.ly/a3sK
Update 4: Radar was closed as a duplicate of an issue.
Update 5: I have a workaround, which is to disable the problem warnings on the Tests target only. Here’s a partial diff. Xcode won’t add the $(inherited) automatically, so you’ll have to add it yourself.
+ WARNING_CFLAGS = (
+ "$(inherited)",
+ "-Wno-documentation-unknown-command",
+ "-Wno-auto-import",
+ "-Wno-incomplete-module",
+ );

Flash Builder - Platform conversion failed error during release build

This is a very annoying problem while generating release build files. Here is the steps I did while building:
Select Project > Export Release Build
Select Signed Native Installer
Import certificate
Click Next.
I always got the following error:
https://forums.adobe.com/servlet/JiveServlet/showImage/2-6524012-651585/build_error.png
Platform conversion failed. Process exited with error 5. Output was
"[ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2
text="Unhandled exception Error: EndUpdateResource: Windows Error #5"
errorID=0]
I have the following setup:
OS: Windows 8.1
System type: 64-bit
Flash Builder Version: 4.6 Premium
Installed FB: FlashBuilder_4_6_LS10.exe
Please help. This is giving me a lot of headaches for a couple of days now.
Additionally, here's the stack trace:
java.io.IOException: Platform conversion failed. Process exited with
error 5. Output was "[ErrorEvent type="error" bubbles=false
cancelable=false eventPhase=2 text="Unhandled exception Error:
EndUpdateResource: Windows Error #5" errorID=0] " at
com.adobe.air.nai.NativePackager.conversionFail(NativePackager.java:222)
at
com.adobe.air.nai.NativePackager.invokePlatformConversion(NativePackager.java:203)
at
com.adobe.air.nai.NativePackager.createPackage(NativePackager.java:92)
at
com.adobe.flexbuilder.multisdk.apollo.export.AIRNativeInstallerPackager.create(AIRNativeI
nstallerPackager.java:129) at
com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionManager.doExport(Ex
portReleaseVersionManager.java:586) at
com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard$1.run(Exp
ortReleaseVersionWizard.java:208)
I also suspect this is because of the following settings:
Eclipse.ini
https://forums.adobe.com/servlet/JiveServlet/showImage/2-6525217-651726/eclipse.png
...
-startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher_library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502.jar
...
Notice that the plugin used is not intended for x64 processors.
#ActionScript3030 is correct, for anyone finding this later on, if you re-link your Library Paths (even if they look correct) this should rectify your issue.
The issue is caused by the links not being able to resolve to their GUID counterparts in your AppData/Local folder. This happens quite commonly when you create a new user profile and try to copy over your old user profiles information.
I already figured this out. I created a virtual machine with windows 7 32bit operating system and I'm happy now :)
If you initially created your project on a different system then try to compile it in another system, the class source and swc paths may not match. These paths could be there but not being implemented in code, so you will not get any run time errors while debugging, but it will give you the error 5 during compilation.
Solution:
Remove the idle paths not directly in use in your code. You can identify them by simply checking the path.
Found the same issue when trying to use Microsoft Essential Security on my Windows 7 x32. When i uinstall it - problem gone. So try to check your firewall settings if stucking the same problem.
Just to add an alternative solution (I'm on an x64 Windows and want to keep build exported for x64), in my case the error popped up when building the project with the AIR SDK defined in the app.xml (an older one, 3.9) and went away when I explicitly used a newer SDK (19).
(Disclaimer: I used the command line adt tool from the SDK to build, not Flash Builder).
A little late, but might possibly help someone.
I had the same error recently with FlashDevelop. Figured out that the my path was too long. When I renamed some long folder and file names, the error disappeared.
Try to disable UAC on Windows 8. Change it to "Never notify". The problem

no valid 'aps-environment' entitlement string found for application

I am trying to configure my app to support push notification, but keep getting this error:
Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x1f818fc0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
I did enable my app to support push notifications (only for development at this point).
I did create the provisioning profile AFTER enabling the push notifications.
My bundle identifier is the same as appears in the profile.
In my profile file there is a string: aps-environment
I made sure that in both project and target under the "Code signing identity" section ALL the values are selected to be my provisioning profile.
Any more ideas? Thanks.
In my case, the stuff in my provisioning profile:
security cms -D -i ~/Downloads/spolskyDevelop.mobileprovision
...
<key>application-identifier</key>
<string>P5GM95Q9VV.com.dca.spolsky</string>
<key>aps-environment</key>
<string>development</string>
Was different than the stuff in the app that was actually built (you can find out where it is built by looking at Xcode's Logs tab)
codesign -d --entitlements - '/Users/drew/Library/Developer/Xcode/DerivedData/spolsky-bdbtdfjeeywhqzccpmmceqvnhgtm/Build/Products/Debug-iphoneos/spolsky-ios.app'
<dict>
<key>application-identifier</key>
<string>Y2X6Z7Z2GR.com.dca.spolsky-ios</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>Y2X6Z7Z2GR.com.dca.spolsky-ios</string>
</array>
</dict>
This was true even though the "Currently Matches" hint text under Code Signing Identity was indicating the correct provisioning profile--weird, huh? To make a weird story weirder, the correct provisioning profile was being installed on the device when I ran, (Settings->General->Profiles) leading me to believe the provisioning profile was right--but it was falling back to a wildcard ID when the app was actually launched.
The clue was the difference in the output of these two commands:
Y2X6Z7Z2GR.com.dca.spolsky-ios vs P5GM95Q9VV.com.dca.spolsky
When I made the bolded part match, the italicized part changed to match automatically. In addition, the output of security and codesign were in agreement, and no more aps-entitlement error.
My guess here is that XCode was using a wildcard-style match on my non-wildcard ID. ("spolsky" is, after all, quite nearly "spolsky-ios"), and this explains the "Currently Matches" output. But something in the build chain is more strict about this, so it falls back to an actual wildcard ID during the build.
The problem is due to current Provisioning Profile does not contain APNS information, as the Provisioning Profile is created BEFORE creating the APNS certificate.
Therefore, to solve the problem, create a new Provisioning Profile & select the Provisioning Profile in Xcode will clear the error.
I had this same problem after push notifications were already working on my device. Seemed like Xcode cached something incorrectly so refreshing it fixed my problem:
Xcode -> Preferences -> Accounts
View Details for your Developer Account
Just click Refresh for the Provision Profiles a few times. I was seeing these change with each refresh. Keep refreshing until they stop changing.
i got this error and did not create a new provisioning profile; created a new one and then had to restart xCode but works now!
Be aware that the bundle identifier must match the provisioning profile in a case-sensitive manner. I had something like com.FirstLast.appname when it should have been com.firstlast.appname. Well, that kept me busy for quite a while.
I fixed this problem by enabling push notification capability.
Select Project > Target > Capabilities > Turn On Push notifications
If this problem happened suddenly after upgrading to Xcode 8 you might find a warning in the capabilities screen that'll allow you to fix this automatically:
Select Project > Target > Capabilities > Turn On Push notifications
Product->Clean did it for me. Hopefully it does it for someone else.
I ran into this in what's possibly a non-frequent use case. I'm working with Xcode 6 and iOS 8. I was creating a series of entirely new app projects, and attempting to re-use the same bundle ID, so as not to need to go through all of the portal-side setup again. This too was just for sandbox testing.
I would find that, while the setup and registration would work fine for the first app, if I deleted that app from the device, set the same bundle ID for the second app, and then attempted to register PNs with that app, I would get this error.
My solution was to:
Remove the associated provisioning profile from the device.
Remove the associated provisioning profile from Xcode.
Close Xcode
Double-click my downloaded .mobileprovision file to install it back into Xcode
Open the project and deploy it.
This approach seems to jar loose whatever previous state was there, and I'm able to register for PNs with the new app / same bundle ID.
For those who got this error in ios 10, you can try following steps:
1.clean your project.
2.and check Targets -> Capabilities -> Push Notification.If it is off,On it.
And problem will solve.The above steps help me to get rid off this problem. Hope it will helpful to someone.
New provisioning profile worked for me. Make sure to use a Developer profile if you are in development (don't use Ad Hoc). It was fine after that, no idea why the old one stopped working right.