diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..56790a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,75 @@ +### https://raw.github.com/github/gitignore/a2f49b7b14276e68c40fcd55345eb3013d8a3375/swift.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + + +### https://raw.github.com/github/gitignore/a2f49b7b14276e68c40fcd55345eb3013d8a3375/Global/OSX.gitignore + +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + diff --git a/EZLoadingActivity.swift b/EZLoadingActivity.swift index 7923e7c..9b61b45 100644 --- a/EZLoadingActivity.swift +++ b/EZLoadingActivity.swift @@ -51,7 +51,9 @@ public struct EZLoadingActivity { return false } - instance = LoadingActivity(text: text, disableUI: disableUI) + dispatch_async(dispatch_get_main_queue()) { + instance = LoadingActivity(text: text, disableUI: disableUI) + } return true } diff --git a/EZLoadingActivity.xcodeproj/project.pbxproj b/EZLoadingActivity.xcodeproj/project.pbxproj index df2354c..c1d96aa 100644 --- a/EZLoadingActivity.xcodeproj/project.pbxproj +++ b/EZLoadingActivity.xcodeproj/project.pbxproj @@ -7,15 +7,20 @@ objects = { /* Begin PBXBuildFile section */ + 1F764D561C1EA1AF007C51AD /* EZLoadingActivity_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F764D551C1EA1AF007C51AD /* EZLoadingActivity_iOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F764D5B1C1EA1C3007C51AD /* EZLoadingActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13884831C02D97700663C96 /* EZLoadingActivity.swift */; }; E13884721C02D85500663C96 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13884711C02D85500663C96 /* AppDelegate.swift */; }; E13884741C02D85500663C96 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13884731C02D85500663C96 /* ViewController.swift */; }; E13884771C02D85500663C96 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E13884751C02D85500663C96 /* Main.storyboard */; }; E13884791C02D85500663C96 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E13884781C02D85500663C96 /* Assets.xcassets */; }; E138847C1C02D85500663C96 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E138847A1C02D85500663C96 /* LaunchScreen.storyboard */; }; - E13884841C02D97700663C96 /* EZLoadingActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13884831C02D97700663C96 /* EZLoadingActivity.swift */; settings = {ASSET_TAGS = (); }; }; + E13884841C02D97700663C96 /* EZLoadingActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = E13884831C02D97700663C96 /* EZLoadingActivity.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 1F764D531C1EA1AF007C51AD /* EZLoadingActivity.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = EZLoadingActivity.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1F764D551C1EA1AF007C51AD /* EZLoadingActivity_iOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EZLoadingActivity_iOS.h; sourceTree = "<group>"; }; + 1F764D571C1EA1AF007C51AD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; E138846E1C02D85500663C96 /* EZLoadingActivity.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZLoadingActivity.app; sourceTree = BUILT_PRODUCTS_DIR; }; E13884711C02D85500663C96 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; E13884731C02D85500663C96 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; }; @@ -27,6 +32,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 1F764D4F1C1EA1AF007C51AD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; E138846B1C02D85500663C96 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -37,10 +49,20 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1F764D541C1EA1AF007C51AD /* EZLoadingActivity_iOS */ = { + isa = PBXGroup; + children = ( + 1F764D551C1EA1AF007C51AD /* EZLoadingActivity_iOS.h */, + 1F764D571C1EA1AF007C51AD /* Info.plist */, + ); + path = EZLoadingActivity_iOS; + sourceTree = "<group>"; + }; E13884651C02D85500663C96 = { isa = PBXGroup; children = ( E13884701C02D85500663C96 /* EZLoadingActivity */, + 1F764D541C1EA1AF007C51AD /* EZLoadingActivity_iOS */, E138846F1C02D85500663C96 /* Products */, ); sourceTree = "<group>"; @@ -49,6 +71,7 @@ isa = PBXGroup; children = ( E138846E1C02D85500663C96 /* EZLoadingActivity.app */, + 1F764D531C1EA1AF007C51AD /* EZLoadingActivity.framework */, ); name = Products; sourceTree = "<group>"; @@ -69,7 +92,36 @@ }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + 1F764D501C1EA1AF007C51AD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 1F764D561C1EA1AF007C51AD /* EZLoadingActivity_iOS.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ + 1F764D521C1EA1AF007C51AD /* EZLoadingActivity_iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1F764D5A1C1EA1AF007C51AD /* Build configuration list for PBXNativeTarget "EZLoadingActivity_iOS" */; + buildPhases = ( + 1F764D4E1C1EA1AF007C51AD /* Sources */, + 1F764D4F1C1EA1AF007C51AD /* Frameworks */, + 1F764D501C1EA1AF007C51AD /* Headers */, + 1F764D511C1EA1AF007C51AD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = EZLoadingActivity_iOS; + productName = EZLoadingActivity_iOS; + productReference = 1F764D531C1EA1AF007C51AD /* EZLoadingActivity.framework */; + productType = "com.apple.product-type.framework"; + }; E138846D1C02D85500663C96 /* EZLoadingActivity */ = { isa = PBXNativeTarget; buildConfigurationList = E13884801C02D85500663C96 /* Build configuration list for PBXNativeTarget "EZLoadingActivity" */; @@ -96,6 +148,9 @@ LastUpgradeCheck = 0700; ORGANIZATIONNAME = "Goktug Yilmaz"; TargetAttributes = { + 1F764D521C1EA1AF007C51AD = { + CreatedOnToolsVersion = 7.2; + }; E138846D1C02D85500663C96 = { CreatedOnToolsVersion = 7.0.1; }; @@ -115,11 +170,19 @@ projectRoot = ""; targets = ( E138846D1C02D85500663C96 /* EZLoadingActivity */, + 1F764D521C1EA1AF007C51AD /* EZLoadingActivity_iOS */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 1F764D511C1EA1AF007C51AD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; E138846C1C02D85500663C96 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -133,6 +196,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 1F764D4E1C1EA1AF007C51AD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1F764D5B1C1EA1C3007C51AD /* EZLoadingActivity.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; E138846A1C02D85500663C96 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -165,6 +236,46 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 1F764D581C1EA1AF007C51AD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = EZLoadingActivity_iOS/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.gbf.EZLoadingActivity-iOS"; + PRODUCT_NAME = EZLoadingActivity; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 1F764D591C1EA1AF007C51AD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = EZLoadingActivity_iOS/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.gbf.EZLoadingActivity-iOS"; + PRODUCT_NAME = EZLoadingActivity; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; E138847E1C02D85500663C96 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -275,6 +386,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 1F764D5A1C1EA1AF007C51AD /* Build configuration list for PBXNativeTarget "EZLoadingActivity_iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1F764D581C1EA1AF007C51AD /* Debug */, + 1F764D591C1EA1AF007C51AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; E13884691C02D85500663C96 /* Build configuration list for PBXProject "EZLoadingActivity" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -291,6 +411,7 @@ E13884821C02D85500663C96 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/EZLoadingActivity.xcodeproj/xcshareddata/xcschemes/EZLoadingActivity_iOS.xcscheme b/EZLoadingActivity.xcodeproj/xcshareddata/xcschemes/EZLoadingActivity_iOS.xcscheme new file mode 100644 index 0000000..aa95243 --- /dev/null +++ b/EZLoadingActivity.xcodeproj/xcshareddata/xcschemes/EZLoadingActivity_iOS.xcscheme @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "0720" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "1F764D521C1EA1AF007C51AD" + BuildableName = "EZLoadingActivity.framework" + BlueprintName = "EZLoadingActivity_iOS" + ReferencedContainer = "container:EZLoadingActivity.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES"> + <Testables> + </Testables> + <AdditionalOptions> + </AdditionalOptions> + </TestAction> + <LaunchAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + allowLocationSimulation = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "1F764D521C1EA1AF007C51AD" + BuildableName = "EZLoadingActivity.framework" + BlueprintName = "EZLoadingActivity_iOS" + ReferencedContainer = "container:EZLoadingActivity.xcodeproj"> + </BuildableReference> + </MacroExpansion> + <AdditionalOptions> + </AdditionalOptions> + </LaunchAction> + <ProfileAction + buildConfiguration = "Release" + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + debugDocumentVersioning = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "1F764D521C1EA1AF007C51AD" + BuildableName = "EZLoadingActivity.framework" + BlueprintName = "EZLoadingActivity_iOS" + ReferencedContainer = "container:EZLoadingActivity.xcodeproj"> + </BuildableReference> + </MacroExpansion> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/EZLoadingActivity_iOS/EZLoadingActivity_iOS.h b/EZLoadingActivity_iOS/EZLoadingActivity_iOS.h new file mode 100644 index 0000000..0b6def4 --- /dev/null +++ b/EZLoadingActivity_iOS/EZLoadingActivity_iOS.h @@ -0,0 +1,19 @@ +// +// EZLoadingActivity_iOS.h +// EZLoadingActivity_iOS +// +// Created by toshi0383 on 12/14/15. +// Copyright © 2015 Goktug Yilmaz. All rights reserved. +// + +#import <UIKit/UIKit.h> + +//! Project version number for EZLoadingActivity_iOS. +FOUNDATION_EXPORT double EZLoadingActivity_iOSVersionNumber; + +//! Project version string for EZLoadingActivity_iOS. +FOUNDATION_EXPORT const unsigned char EZLoadingActivity_iOSVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import <EZLoadingActivity_iOS/PublicHeader.h> + + diff --git a/EZLoadingActivity_iOS/Info.plist b/EZLoadingActivity_iOS/Info.plist new file mode 100644 index 0000000..d3de8ee --- /dev/null +++ b/EZLoadingActivity_iOS/Info.plist @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>FMWK</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>$(CURRENT_PROJECT_VERSION)</string> + <key>NSPrincipalClass</key> + <string></string> +</dict> +</plist>