Posts

Post not yet marked as solved
4 Replies
2.1k Views
When showing an ImageDownloader actor, the presenter said a solution on avoiding duplicate downloads is shown with the code associated with this video. When will this code be available? I don't see it on the video page.
Posted
by MegaWatt.
Last updated
.
Post not yet marked as solved
3 Replies
7k Views
I'm trying to swap out the rootViewController in my appDelegate with an animation and it is just flashing to the new viewController without any animation.-(void)showRootController:(UIViewController *)controller { [UIView transitionWithView:self.window duration:0.5 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{ self.window.rootViewController = controller; [self.window makeKeyAndVisible]; } completion:nil]; }How can I do this with an animation? (Testing on an iPhone 5s with iOS 8)
Posted
by MegaWatt.
Last updated
.
Post not yet marked as solved
1 Replies
2.3k Views
Using Xcode 11 beta, I'm trying to Add Package Dependency: https://github.com/AaronBratcher/ALBNoSQLDB.git but get an error saying Package Resolution FailedI suspect the Package.swift file I created is improperly defined. Can someone help me get it set properly?Thanks.
Posted
by MegaWatt.
Last updated
.
Post not yet marked as solved
14 Replies
14k Views
I used this script in the post-action of the archive in my scheme to make a FAT binary framework. One that will work on the simulator and actual device.`https://gist.github.com/gauravkeshre/eabb2a13ef6d673fadec84ca60b56b05`Does anyone know how to convert it to work with Xcode 10?Here is the script itself: exec > /tmp/${PROJECT_NAME}_archive.log 2>&1 UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal if [ "true" == ${ALREADYINVOKED:-false} ] then echo "RECURSION: Detected, stopping" else export ALREADYINVOKED="true" # make sure the output directory exists mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" echo "Building for iPhoneSimulator" xcodebuild -workspace "${WORKSPACE_PATH}" -scheme "${TARGET_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone XS' ONLY_ACTIVE_ARCH=NO ARCHS='i386 x86_64' BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" ENABLE_BITCODE=YES OTHER_CFLAGS="-fembed-bitcode" BITCODE_GENERATION_MODE=bitcode clean build # Step 1. Copy the framework structure (from iphoneos build) to the universal folder echo "Copying to output folder" cp -R "${ARCHIVE_PRODUCTS_PATH}${INSTALL_PATH}/${FULL_PRODUCT_NAME}" "${UNIVERSAL_OUTPUTFOLDER}/" # Step 2. Copy Swift modules from iphonesimulator build (if it exists) to the copied framework directory SIMULATOR_SWIFT_MODULES_DIR="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${TARGET_NAME}.framework/Modules/${TARGET_NAME}.swiftmodule/." if [ -d "${SIMULATOR_SWIFT_MODULES_DIR}" ]; then cp -R "${SIMULATOR_SWIFT_MODULES_DIR}" "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework/Modules/${TARGET_NAME}.swiftmodule" fi # Step 3. Create universal binary file using lipo and place the combined executable in the copied framework directory echo "Combining executables" lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${EXECUTABLE_PATH}" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${EXECUTABLE_PATH}" "${ARCHIVE_PRODUCTS_PATH}${INSTALL_PATH}/${EXECUTABLE_PATH}" # Step 4. Create universal binaries for embedded frameworks # for SUB_FRAMEWORK in $( ls "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework/Frameworks" ); do # BINARY_NAME="${SUB_FRAMEWORK%.*}" # lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework/Frameworks/${SUB_FRAMEWORK}/${BINARY_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${SUB_FRAMEWORK}/${BINARY_NAME}" "${ARCHIVE_PRODUCTS_PATH}${INSTALL_PATH}/${TARGET_NAME}.framework/Frameworks/${SUB_FRAMEWORK}/${BINARY_NAME}" # done # Step 5. Convenience step to copy the framework to the project's directory echo "Copying to project dir" yes | cp -Rf "${UNIVERSAL_OUTPUTFOLDER}/${FULL_PRODUCT_NAME}" "${PROJECT_DIR}" open "${PROJECT_DIR}" fi
Posted
by MegaWatt.
Last updated
.
Post not yet marked as solved
6 Replies
2.6k Views
I have a framework binary built with Swift that I'm trying to incorporate into an Objective-C project. However the class in the framework isn't available.In the swift framework, the class is defined like this:@objcMembers @objc public final class Messaging: NSObject, UINavigationControllerDelegate, LogsManagerDelegate { ... }I drag the archived and exported framework directly into the project to use and make sure the Defines Module is set to Yes in the Build Settings.In the Objective-C I try to use the framework:@import ContactAtOnceMessaging; @implementation MessagingExperience Messaging *messaging; // Unknown type name 'Messaging' ... @endIf I drag the code for the framework directly into the project, Messaging is a known class so I know the Swift is okay.I also tried changing the import to the following, but that didn't work. #import "ContactAtOnceMessaging/ContactAtOnceMessaging-Swift.h"What am I doing wrong?
Posted
by MegaWatt.
Last updated
.