AVCapturePhotoOutput - changes in Xcode 9 Beta 5 - swift

Just installed the latest XCode version which provided some changes in AVCapturePhotoOutput class, I wonder how to fetch the list of support flash modes. In the previous version, I used supportedFlashModes property which is no more available
open var __supportedFlashModes: [NSNumber] { get }

I guess new Swiftified supportedFlashModes property is planned but not yet completed in beta 5.
open var supportedFlashModes: [AVCaptureDevice.FlashMode] { get }
Until the day my guess will be confirmed (can be negative), you can use __supportedFlashModes. It's not removed, just renamed.
(Some betas contain this sort of under-construction renaming.)
You should better send a bug report to keep Apple aware of this issue.
EDIT
Seems iOS 11 SDK/Xcode 9.1 has fixed this issue and the Release Notes of Xcode 9.1 beta say:
The following AVFoundation API are now available:
AVCaptureDevice.Format.supportedColorSpaces
AVCaptureDevice.supportedFlashModes
AVCapturePhotoOutput.availablePhotoPixelFormatTypes
AVCapturePhotoOutput.availableRawPhotoPixelFormatTypes
AVCapturePhotoSettings.availablePreviewPhotoPixelFormatTypes
Code which was previously modified to use a double underscore as a
workaround should be modified to use these public symbols or the app
may be rejected by the App Store.
(Bold style added.)

Apple camera dev team confirms the Swift version of the API was inadvertently left out of Xcode 9 release.
Until fixed have to use __supportedFlashModes
See here: https://forums.developer.apple.com/thread/86810
BTW some other AVFoundation APIs also affected.

Related

Invalid Swift Support xcode 8 itunesconnect issue

I am struggling to get my build uploaded to itunesconnect since upgrading to XCode8 - might have to do with the swift 3.0 syntax update?... i am new to iOS dev, having been doing it now since xcode 7.1....
I submit the through Organizer, the ipa uploads, but then i get an email from itunesconnect:
"Invalid Swift Support - The expected dylibs are missing from the app’s Framework location, such as /Payload/Health Storylines.app/Frameworks."
My app target uses obj-c, and the UItest target uses swift.
ive read: Invalid Swift Support / invalid implementation of swift
i cant find any embedded swift settings in xcode8...
ive read:Invalid Swift Support - Files don’t match
but in the .sh they want some lines commented out - it only runs on xcode version below 7...show this shouldnt matter.
ive just read http://radex.io/xcode7-xcode8/
there are some cocopoads code signing topics in here...not sure if this is relevant?
this the the contects of the .xarchive:
Im thinking swift need to be turned off somewhere, but dont know where...
Help much appreciated!
Seems like a problem that I had. Try archiving and exporting the IPA with XCode 7.x.x, and then upload it with Application Loader (XCode 8 GM). Also, what is your macOS version?
I had the same issue If you are using fastlane and swift 2.3 you may try adding toolchain "com.apple.dt.toolchain.Swift_2_3" on your Gymfile, it worked for me.

QuickLook framework not working properly in iOS 10 (with Xcode 8.0 beta 3) to display .csv file

I have developed and updated a medical application for cardiac ultrasound since 2011. One feature of the app is a user-generated document library for documents, images, and movies, all displayed using QuickLook.framework. QuickLook has functioned well until now with iOS 10. At this point .csv files (generated by the app to store calculated data) display as simple text (including the commas) instead of as a spreadsheet. I have not found any Apple documentation to explain this change in behavior. The log in Xcode shows no error messages when displaying a .csv file.
I am using the iOS Simulator at this point to test my app with iOS 10. However, I have verified that the El Capitan (10.11.5) version of QuickLook opens a .csv file in the simulator library on the desktop without a problem, with the expected spreadsheet format. Therefore, I do not suspect any problem with the .csv files that my app is producing.
I suspect this problem with .csv display is a bug in iOS 10, but with no resolution after 3 beta releases, I am concerned that the problem persists. Any help would be much-appreciated. My hope is that there will not be a need to adopt a new document display method, since QuickLook has worked so well for several years now.
Of note, my app does not use any Swift code.
iOS 10 is still in beta and will be in beta until at least the second half of September.
One of the main advices there is while testing beta software is to test it on the real device with something like iOS 10 Public Beta build installed.
If you are 100% positive that this is a consistent, well repeatable bug on Apple's side (not on your own or any other 3rd-party library you might use) consider filing a radar.
Concerning your specific problem, as far to my knowledge, Apple didn't make any significant changes to the QuickLook functionality in iOS 10, but once again, you can prove me wrong, by carefully browsing through all the latest changes in the official iOS 10 changelog.

CoreAudio PublicUtility on Xcode 4.3.1 iOS 5.1

I've an app using low level CoreAudio C functions, usually located under /Volumes/Xcode/Xcode.app/Contents/Developer/Extras/CoreAudio/PublicUtility/. Just installed Xcode 4.3.1 and iOS 5.1 and Public Utility seems gone away.
My missing files are:
CADebugMacros.h
CAMath.h
CAStreamBasicDescription.cpp
CAStreamBasicDescription.h
Anyone knows if these files have been removed from this last release or should I just copy the files from previous Xcode version?
CoreAudio Public Utility has been there since iOS 2 (at least).
Ty!
This is explained in the Xcode 4.3 what's new documentation.
Choose this menu:
Xcode > Open Developer Tool > More Developer Tools...
and download "Audio Tools for Xcode".
Better place to get them is directly from the Apple Sample Code Reference Library.
http://developer.apple.com/library/ios/#samplecode/CoreAudioUtilityClasses/Introduction/Intro.html
Sample code links in the RefLib. also provides versioning and modification history information which is helpful allowing you to stay current if there's any bug fixes with these sources.
Apple appears to be updating all their Audio samples to contain whatever subset of public utility is required by each sample, but if you want it all (and I suggest that you do as it's oozing with goodness), grab it from the above link.

Code with Three 20 latest version facebook-three20-726841e rejected by Apple

I got this response from Apple when i submitted my App with Three 20.I did my project in Xcode 4 and used the latest version of Three 20 i.e. facebook-three20-726841e.
I already did the changes in other posts.
It got rejected again.
Our system has determined your app is using private or undocumented APIs:
The app references private or undocumented symbols
OBJC_IVAR_$_UITouch._locationInWindow
OBJC_IVAR_$_UITouch._phase
OBJC_IVAR_$_UITouch._previousLocationInWindow
OBJC_IVAR_$_UITouch._tapCount
OBJC_IVAR_$_UITouch._timestamp
OBJC_IVAR_$_UITouch._touchFlags
OBJC_IVAR_$_UITouch._view
OBJC_IVAR_$_UITouch._window
Please help me with this.
Thanks.
The non-public API that is included in your application is UITouch._touchFlags.
See if this helps http://cocoatouchdown.blogspot.com/2009/12/uitouchtouchflags-are-private.html
Also something useful about this http://groups.google.com/group/three20/browse_thread/thread/c442af6e39a918b0?fwc=1

detecting and preventing crashed on older iOS (Suspecting EventKit)

Dear Scholars.
I have created a simple application using the latest SDK (4.2.1), Which runs smoothly and error free on all devices with iOS 4.x.x.
Lately I am getting some comments from users with older iOS version complaining the application is crashing on start, on Apple's crash log I see nothing at all.
Pushing my investigation forward, the only suspect I have at the moment is the use of EventKit class, which if memory serves, where introduced only after iOS4.
I am using it very lightly in one of my classes, and it works perfectly on iOS4.2.1
#import <EventKit/EventKit.h>
//some time later
[self setADateInCal: [MyTimeArray objectAtIndex:0] :formatterDate];
Thus my Questions:
Can this be the issue that crashes my application on iOS < 4 ?
How can I prevent it without dropping the feature for people with iOS4
In general, How can I test this? I have the latest official iOS on my device and SDK, the simulator is limited to how back it can go in regrading to iOS version... any magical way to do so?
1.) Yes. If it wasn't in the API in <4.0 than anyone not running >4.0 will crash.
2.) Test to see if the class is available using NSClassFromString (Google for examples) and respondsToSelector in correspondence to see if the method you want is available to use in the OS version the client is running. You will also probably need to weak link the EventKit framework (again Google for how to do this).
3.) The only real way to test this is to keep a device at the OS you want to test. Personally, I have an old iPhone that I never update running 3.1.3 for things just like this. Alternatively, you can keep old installs of xcode+iOSSDK on different partitions or something and use their simulator. (for future updates i guess since you obviously haven't done this for <4.0). But no, there is no magical way to do this. sorry.
edit for clarity on Number 2: Basically you will check to see if the class/method you want is available on the OS version you are currently running, if it is you can use it, if not you will have to find a work around (omit completely or do it another way that is compliant with older versions).
Yes it could be causing the crash. Issues with missing libraries do not report anything in the apple crash log.
To prevent it from happening you need to do two things,
Weak link the event kit library in xcode.
Check for its existence in your code with something like
,
if(!NSClassFromString(#"EKEventKit")){
//do stuff with event kit
}
The only way to test on the actual iOS version is to get hold of a physical device running ios < 4.