forked from Alamofire/Alamofire
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix watchOS Memory Leaks (Alamofire#3110)
* Add watchOS sample project for testing. * Always disassociate on watchOS. * Add information comment about watchOS workaround. * Clean up the watchOS example. * Add bug and workarounds to README and documentation. * Add proper licensing headers. * Delay completion of request for test stability.
- Loading branch information
Showing
28 changed files
with
1,280 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
...hOS Example/watchOS Example WatchKit App/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"size" : "24x24", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "notificationCenter", | ||
"subtype" : "38mm" | ||
}, | ||
{ | ||
"size" : "27.5x27.5", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "notificationCenter", | ||
"subtype" : "42mm" | ||
}, | ||
{ | ||
"size" : "29x29", | ||
"idiom" : "watch", | ||
"role" : "companionSettings", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"size" : "29x29", | ||
"idiom" : "watch", | ||
"role" : "companionSettings", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"size" : "40x40", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "appLauncher", | ||
"subtype" : "38mm" | ||
}, | ||
{ | ||
"size" : "44x44", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "appLauncher", | ||
"subtype" : "40mm" | ||
}, | ||
{ | ||
"size" : "50x50", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "appLauncher", | ||
"subtype" : "44mm" | ||
}, | ||
{ | ||
"size" : "86x86", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "quickLook", | ||
"subtype" : "38mm" | ||
}, | ||
{ | ||
"size" : "98x98", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "quickLook", | ||
"subtype" : "42mm" | ||
}, | ||
{ | ||
"size" : "108x108", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "quickLook", | ||
"subtype" : "44mm" | ||
}, | ||
{ | ||
"idiom" : "watch-marketing", | ||
"size" : "1024x1024", | ||
"scale" : "1x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
watchOS Example/watchOS Example WatchKit App/Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
watchOS Example/watchOS Example WatchKit App/Base.lproj/Interface.storyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="11134" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="3mp-fW-waa"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="11055"/> | ||
</dependencies> | ||
<scenes> | ||
<!--Interface Controller--> | ||
<scene sceneID="aou-V4-d1y"> | ||
<objects> | ||
<hostingController id="3mp-fW-waa" customClass="HostingController" | ||
customModuleProvider="target"/> | ||
</objects> | ||
</scene> | ||
</scenes> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?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>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>watchOS Example WatchKit App</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>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
</array> | ||
<key>WKWatchKitApp</key> | ||
<true/> | ||
</dict> | ||
</plist> |
28 changes: 28 additions & 0 deletions
28
...it Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : "<=145" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : ">161" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : ">145" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : ">183" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
...hOS Example WatchKit Extension/Assets.xcassets/Complication.complicationset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"assets" : [ | ||
{ | ||
"idiom" : "watch", | ||
"filename" : "Circular.imageset", | ||
"role" : "circular" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"filename" : "Extra Large.imageset", | ||
"role" : "extra-large" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"filename" : "Graphic Bezel.imageset", | ||
"role" : "graphic-bezel" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"filename" : "Graphic Circular.imageset", | ||
"role" : "graphic-circular" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"filename" : "Graphic Corner.imageset", | ||
"role" : "graphic-corner" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"filename" : "Graphic Large Rectangular.imageset", | ||
"role" : "graphic-large-rectangular" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"filename" : "Modular.imageset", | ||
"role" : "modular" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"filename" : "Utilitarian.imageset", | ||
"role" : "utilitarian" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : "<=145" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : ">161" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : ">145" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : ">183" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...tension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : "<=145" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : ">161" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : ">145" | ||
}, | ||
{ | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"screen-width" : ">183" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Oops, something went wrong.